/**
 * @author LKQ
 * @date 2022/2/26 11:05
 * @description AC
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int[] corpFlightBookings(int[][] bookings, int n) {
        int[] ans = new int[n];
        int m = bookings.length;
        for(int i = 0; i < m; i++) {
            int first = bookings[i][0], last = bookings[i][1];
            for(int j = first; j <= last; j++) {
                ans[j- 1] += bookings[i][2];
            }
        }
        return ans;
    }
}
